<?php
	print "<div id=\"news\">";

	// liste des articles
	$query = "SELECT " . $tbl_prefix . "articles.*, " . $tbl_prefix . "articles_trans.* FROM " . $tbl_prefix . "articles LEFT JOIN " . $tbl_prefix . "articles_trans ON " . $tbl_prefix . "articles.id = " . $tbl_prefix . "articles_trans.id AND " . $tbl_prefix . "articles_trans.language = '$language' WHERE " . $tbl_prefix . "articles.status = 'H' AND " . $tbl_prefix . "articles.level <= " . $user_level;
	$mysql_result = database_query($query);
	
	$index = 0;
	$num_rows = mysql_num_rows($mysql_result);
	$random = rand(1, $num_rows);
	while ($random--)
		$row = mysql_fetch_object($mysql_result);
		
	print "<span class=\"headline\">";
	print "<a class=\"headline_title\" target=\"_top\" href=\"../../frame.php?label=" . $row->label . "&article=" . $row->id . "&language=" . $language . "\">" . $row->title . "</a>";
	if ($row->resume)
		print "<br><span class=\"headline_resume\">" . $row->resume . "</span>";
	if ($row->author)
		print "<br><span class=\"headline_author\">" . $row->author . "</span>";
	print "</span>";
	
    print "<center><a href=\"" . $site_path . "/index.php?url=cms/scripting/headlines.php\" target=\"_top\">" . $str_display_all . "</a></center>";
	print "</div>";

?>
